unit Unitcomm;

interface
uses  Windows ;
function GetLocalName: String;
implementation
  function GetLocalName: String;
    var
   CNameBuffer    :    PChar;
   CLen    : ^DWord;
  begin
   GetMem(CNameBuffer,255);
   New(CLen);
   CLen^:=    255;
   if GetComputerName(CNameBuffer,CLen^) then
     result:=CNameBuffer
   else
     result:='';
   FreeMem(CNameBuffer,255);
   Dispose(CLen);

  end;
end.
